import React from "react";
import { View, Text } from "@tarojs/components";
import { Image } from "@/components";
import Taro from "@tarojs/taro";

const ImageScreen: Taro.FC = () => {
  const imageUrl =
    "https://cdn.yryz.com/lovelorn/image/default/202011/755753211043840.jpg?w=640&h=854";

  return (
    <View
      style={{
        display: "flex",
        flexDirection: "column",
        justifyContent: "center",
        alignItems: "center"
      }}
    >
      <Text>加载网络图片</Text>
      <Image mode="aspectFit" src={imageUrl} style={{ marginTop: "10px" }} />
      <Text
        style={{ color: "blue" }}
        onClick={() => Taro.previewImage({ urls: [imageUrl] })}
      >
        点击查看大图
      </Text>
    </View>
  );
};
export default ImageScreen;
